<template>
	<el-card class="form-container">
		<el-form :model="goodsSkuDetail" label-width="100px">
			<el-form-item label="" prop="id">
				<el-input v-model="goodsSkuDetail.id" disabled="disabled"></el-input>
			</el-form-item>
			<el-form-item label="sku名称" prop="skuName">
				<el-input v-model="goodsSkuDetail.skuName" disabled="disabled"></el-input>
			</el-form-item>
			<el-form-item label="商品价格" prop="goodsPrice">
				<el-input v-model="goodsSkuDetail.goodsPrice" disabled="disabled"></el-input>
			</el-form-item>
			<el-form-item label="库存数量" prop="stockNum">
				<el-input v-model="goodsSkuDetail.stockNum" disabled="disabled"></el-input>
			</el-form-item>
			<el-form-item label="预警库存数量" prop="alertStockNum">
				<el-input v-model="goodsSkuDetail.alertStockNum" disabled="disabled"></el-input>
			</el-form-item>
			<el-form-item label="商品主图" prop="masterImage">
				<el-input v-model="goodsSkuDetail.masterImage" disabled="disabled"></el-input>
			</el-form-item>
			<el-form-item label="图片列表：轮播图" prop="rotateImageList">
				<el-input v-model="goodsSkuDetail.rotateImageList" disabled="disabled"></el-input>
			</el-form-item>
			<el-form-item label="商品重量(克)" prop="goodsWeight">
				<el-input v-model="goodsSkuDetail.goodsWeight" disabled="disabled"></el-input>
			</el-form-item>
			<el-form-item label="spu编号" prop="spuCode">
				<el-input v-model="goodsSkuDetail.spuCode" disabled="disabled"></el-input>
			</el-form-item>
			<el-form-item label="商品分类编号" prop="categoryCode">
				<el-input v-model="goodsSkuDetail.categoryCode" disabled="disabled"></el-input>
			</el-form-item>
			<el-form-item label="类目名称" prop="categoryName">
				<el-input v-model="goodsSkuDetail.categoryName" disabled="disabled"></el-input>
			</el-form-item>
			<el-form-item label="品牌名称" prop="brandName">
				<el-input v-model="goodsSkuDetail.brandName" disabled="disabled"></el-input>
			</el-form-item>
			<el-form-item label="商品规格" prop="goodsSpec">
				<el-input v-model="goodsSkuDetail.goodsSpec" disabled="disabled"></el-input>
			</el-form-item>
			<el-form-item label="商品销量" prop="salesVolume">
				<el-input v-model="goodsSkuDetail.salesVolume" disabled="disabled"></el-input>
			</el-form-item>
			<el-form-item label="商品评论量" prop="commentVolume">
				<el-input v-model="goodsSkuDetail.commentVolume" disabled="disabled"></el-input>
			</el-form-item>
			<el-form-item label="商品状态 1.正常 2.下架 3.删除" prop="goodsStatus">
				<el-input v-model="goodsSkuDetail.goodsStatus" disabled="disabled"></el-input>
			</el-form-item>
			<el-form-item label="创建时间" prop="createTime">
				<el-input v-model="goodsSkuDetail.createTime" disabled="disabled"></el-input>
			</el-form-item>
			<el-form-item label="修改时间" prop="updateTime">
				<el-input v-model="goodsSkuDetail.updateTime" disabled="disabled"></el-input>
			</el-form-item>
			<el-form-item label="商品条码" prop="goodsBarCode">
				<el-input v-model="goodsSkuDetail.goodsBarCode" disabled="disabled"></el-input>
			</el-form-item>
			<el-form-item label="" prop="skuCode">
				<el-input v-model="goodsSkuDetail.skuCode" disabled="disabled"></el-input>
			</el-form-item>
			<el-form-item>
				<el-button @click="close">关闭</el-button>
			</el-form-item>
		</el-form>
	</el-card>
</template>

<script>
	import { findGoodsSkuDetail } from '@/api/mall/goodsSku'
	export default {
		name: 'view-goodsSku',
		data() {
			return {
				goodsSkuDetail: {}
			}
		},
		created() {
			this.view(this.$route.query.id)
		},
		methods: {
			view(val) {
				findGoodsSkuDetail(val).then(res => {
					console.log('查询返回结果', res)
					this.goodsSkuDetail = res.data.responseData
				})
			},
			close() {
				this.$router.go(-1)
			}
		}
	}
</script>

<style>
</style>
